#include<bits/stdc++.h>
#define A 10005
using namespace std;
int n,r[A];

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    int sum=n;
    for(int i=1;i<=n;i++){
        cin>>r[i];
    }
    for(int i=2;i<=n;i++){
        if(r[i]>r[i-1]){
            sum--;
        }
    }
    cout<<sum;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
